<?php

/**
 * @author FROSTY (valik619)
 * @site nadmad.ru
 * @mail valik619@inbox.ru
 */
  
 include('core.php');

$pr = $_GET['id'];
$search = mysql_query("SELECT * FROM `rekl` WHERE `id` = '$pr'");
$url = mysql_fetch_assoc($search);
if(mysql_num_rows($search) > 0){
    mysql_query("UPDATE `rekl` SET `perehod` = `perehod` + '1' WHERE `id`='$pr'");
    header('Location: http://'.$url['ssil'].'');
}else{
    header('Location: http://'.$set['home'].'/index.php');
}
/**
 * @author FROSTY (valik619)
 * @site nadmad.ru
 * @mail valik619@inbox.ru
 */

?>